home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Tools - Objects / MacApp / MacApp CD Release / MacApp 2.0.1 (Many Libraries) / Libraries / MacApp.r < prev    next >
Encoding:
Text File  |  1990-10-25  |  21.8 KB  |  1,111 lines  |  [TEXT/MPS ]

  1. /*
  2.     MacApp.r
  3.     MacApp® Common Resources
  4.     Copyright © 1986-1990 Apple Computer, Inc.    All rights reserved.
  5. */
  6.  
  7. /* • Auto-Include the requirements for this source */
  8. #ifndef __TYPES.R__
  9. #include "Types.r"
  10. #endif
  11.  
  12. #ifndef __MacAppTypes__
  13. #include "MacAppTypes.r"
  14. #endif
  15.  
  16. #ifndef __ViewTypes__
  17. #include "ViewTypes.r"
  18. #endif
  19.  
  20. /* NOTE:
  21.  
  22.     By Toolbox convention, the OK button is item 1 and the Cancel button
  23.         is item 2.
  24. */
  25.  
  26. #define        kBaseMacApp            129
  27. #define        kReservedForCommands 130    /* room to reserve for TCommand allocations that should never fail */
  28. #define        kScrollBarId        202
  29. #define      kInspectorWindowType        900
  30.  
  31. /* memory stuff */
  32. resource 'mem!' (kBaseMacApp,
  33. #if qNames
  34.     "BaseMacApp",
  35. #endif
  36.     purgeable) {
  37.     4096,                // Add to temporary reserve
  38.     4096,                // Add to permanent reserve
  39.     8192                // Add to stack space (actually this first one sets the base stack requirement
  40.                         // to be the same as for a Macintosh® Plus.
  41. };
  42.  
  43. /* memory stuff */
  44. resource 'mem!' (kReservedForCommands,
  45. #if qNames
  46.     "ReservedForCommands",
  47. #endif
  48.     purgeable) {
  49.     128,                // Add to temporary reserve
  50.     0,                    // Add to permanent reserve
  51.     0                    // Add to stack space
  52. };
  53.  
  54.  
  55. resource 'seg!' (kBaseMacApp,
  56. #if qNames
  57.     "BaseMacApp",
  58. #endif
  59.     purgeable) {
  60.     {    "Main";
  61.         "MAMain";
  62.         "GMain";
  63.         "GRes";
  64.         "GRes2";
  65.         "ARes";
  66.         "BBRes";
  67.         "BBRes2";
  68.         "%_MethTables";
  69.         "GError";
  70. #if qInspector && !qDebug
  71.         "GDebug";
  72.         "GInspector";
  73.         "GWriteLn";
  74.         "AFields";
  75.         "GFields"
  76. #endif
  77. #if qPerform
  78.         "GPerformanceTools";
  79. #endif
  80.     };
  81. };
  82.  
  83. resource 'res!' (kBaseMacApp,
  84. #if qNames
  85.     "BaseMacApp",
  86. #endif
  87.     purgeable) {
  88.     {    "Main";
  89.         "MAMain";
  90.         "GMain";
  91.         "GRes";
  92.         "GRes2";
  93.         "ARes";
  94.         "BBRes";
  95.         "BBRes2";
  96.         "%_MethTables";
  97.         "GError";
  98. #if qInspector && !qDebug
  99.         "GDebug";
  100.         "GInspector";
  101.         "GWriteLn";
  102.         "AFields";
  103.         "GFields"
  104. #endif
  105. #if qPerform
  106.         "GPerformanceTools";
  107. #endif
  108.     };
  109. };
  110.  
  111. /* one of 3 alerts for indicating errors */
  112. resource 'DITL' (phGenError,
  113. #if qNames
  114.     "phGenError",
  115. #endif
  116.     purgeable) {
  117.     {    /* array DITLarray: 3 elements */
  118.         /* [1] */
  119.         {120, 198, 138, 272},
  120.         Button {
  121.             enabled,
  122.             "OK"
  123.         };
  124.         /* [2] */
  125.         /*    ^0 = reason for error; e.g., 'the disk is locked'
  126.             ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
  127.             ^2 = what operation failed; e.g., 'save the document'
  128.         */
  129.         
  130.         {10, 70, 115, 272},
  131.         StaticText {
  132.             disabled,
  133.             "Could not ^2 because ^0.  ^1"
  134.         };
  135.         /* [3] */
  136.         {10, 20, 42, 52},
  137.         Icon {
  138.             disabled,
  139.             0
  140.         }
  141.     }
  142. };
  143.  
  144. resource 'DITL' (phCmdErr,
  145. #if qNames
  146.     "phCmdErr",
  147. #endif
  148.     purgeable) {
  149.     {    /* array DITLarray: 3 elements */
  150.         /* [1] */
  151.         {120, 198, 138, 272},
  152.         Button {
  153.             enabled,
  154.             "OK"
  155.         };
  156.         /* [2] */
  157.         /*    ^0 = reason for error; e.g., 'the disk is locked'
  158.             ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
  159.             ^2 = what menu command failed; e.g., 'New'
  160.         */
  161.         
  162.         {10, 70, 115, 272},
  163.         StaticText {
  164.             disabled,
  165.             "Could not complete the “^2” command because ^0.  ^1"
  166.         };
  167.         /* [3] */
  168.         {10, 20, 42, 52},
  169.         Icon {
  170.             disabled,
  171.             0
  172.         }
  173.     }
  174. };
  175.  
  176. resource 'DITL' (phUnknownErr,
  177. #if qNames
  178.     "phUnknownErr",
  179. #endif
  180.     purgeable) {
  181.     {    /* array DITLarray: 3 elements */
  182.         /* [1] */
  183.         {120, 198, 138, 272},
  184.         Button {
  185.             enabled,
  186.             "OK"
  187.         };
  188.         /* [2] */
  189.         /*    ^0 = reason for error; e.g., 'the disk is locked'
  190.             ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
  191.             This alert is used if the program does not provide any indication
  192.                 of what operation failed.
  193.         */
  194.         
  195.         {10, 70, 115, 272},
  196.         StaticText {
  197.             disabled,
  198.             "Could not complete your request because "
  199.             "^0.  ^1"
  200.         };
  201.         /* [3] */
  202.         {10, 20, 42, 52},
  203.         Icon {
  204.             disabled,
  205.             0
  206.         }
  207.     }
  208. };
  209.  
  210.  
  211. /* used to confirm saving changes to a document when closing or quitting */
  212.  
  213. resource 'DITL' (phSaveChanges,
  214. #if qNames
  215.     "phSaveChanges",
  216. #endif
  217.     purgeable) {
  218.     {    /* array DITLarray: 4 elements */
  219.         /* [1] */
  220.         {58, 25, 76, 99},
  221.         Button {
  222.             enabled,
  223.             "Yes"
  224.         };
  225.         /* [2] */
  226.         {86, 195, 104, 269},
  227.         Button {
  228.             enabled,
  229.             "Cancel"
  230.         };
  231.         /* [3] */
  232.         {86, 25, 104, 99},
  233.         Button {
  234.             enabled,
  235.             "No"
  236.         };
  237.         /* [4] */
  238.         /*    ^0 = name of document
  239.             ^1 = either 'closing' or 'quitting' (see STR# below)
  240.         */
  241.         
  242.         {12, 20, 45, 277},
  243.         StaticText {
  244.             disabled,
  245.             "Save changes to “^0” before ^1?"
  246.         }
  247.     }
  248. };
  249.  
  250. /* used to confirm a Revert command */
  251.  
  252. resource 'DITL' (phRevert,
  253. #if qNames
  254.     "phRevert",
  255. #endif
  256.     purgeable) {
  257.     {    /* array DITLarray: 4 elements */
  258.         /* [1] */
  259.         {80, 198, 98, 272},
  260.         Button {
  261.             enabled,
  262.             "OK"
  263.         };
  264.         /* [2] */
  265.         {80, 20, 98, 94},
  266.         Button {
  267.             enabled,
  268.             "Cancel"
  269.         };
  270.         /* [3] */
  271.         /*    ^0 = name of document
  272.         */
  273.         
  274.         {10, 70, 75, 272},
  275.         StaticText {
  276.             disabled,
  277.             "Do you want to discard changes made to “^0”?"
  278.         };
  279.         /* [4] */
  280.         {10, 20, 42, 52},
  281.         Icon {
  282.             disabled,
  283.             2
  284.         }
  285.     }
  286. };
  287.  
  288.  
  289. /* used when a document changes unexpectedly on the disk; e.g., if
  290.     the document in on a file server and 2 people open it */
  291.  
  292. resource 'DITL' (phFileChanged,
  293. #if qNames
  294.     "phFileChanged",
  295. #endif
  296.     purgeable) {
  297.     {    /* array DITLarray: 4 elements */
  298.         /* [1] */
  299.         {110, 198, 128, 272},
  300.         Button {
  301.             enabled,
  302.             "OK"
  303.         };
  304.         /* [2] */
  305.         {110, 20, 128, 94},
  306.         Button {
  307.             enabled,
  308.             "Cancel"
  309.         };
  310.         /* [3] */
  311.         /*    ^0 = name of document
  312.             ^1 = the operation (e.g., 'save' or 'revert')
  313.         */
  314.         
  315.         {10, 70, 105, 272},
  316.         StaticText {
  317.             disabled,
  318.             "The disk copy of “^0” was changed since you last "
  319.             "opened or saved it.  Do you want to ^1 anyway?"
  320.         };
  321.         /* [4] */
  322.         {10, 20, 42, 52},
  323.         Icon {
  324.             disabled,
  325.             2
  326.         }
  327.     }
  328. };
  329.  
  330. /* Used when the document cannot be saved unless the original version is
  331.     deleted from the disk.    This gives the user a chance to confirm this. */
  332.     
  333. resource 'DITL' (phPurgeOld,
  334. #if qNames
  335.     "phPurgeOld",
  336. #endif
  337.     purgeable) {
  338.     {    /* array DITLarray: 4 elements */
  339.         /* [1] */
  340.         {125, 198, 143, 272},
  341.         Button {
  342.             enabled,
  343.             "OK"
  344.         };
  345.         /* [2] */
  346.         {125, 20, 143, 94},
  347.         Button {
  348.             enabled,
  349.             "Cancel"
  350.         };
  351.         /* [3] */
  352.         {10, 70, 120, 272},
  353.         StaticText {
  354.             disabled,
  355.             "There is not enough disk space to save the document "
  356.             "unless the existing copy is deleted first.  "
  357.             "Delete existing copy of “^0”?"
  358.         };
  359.         /* [4] */
  360.         {10, 20, 42, 52},
  361.         Icon {
  362.             disabled,
  363.             2
  364.         }
  365.     }
  366. };
  367.  
  368. /* used when the user opens the same document twice */
  369.  
  370. resource 'DITL' (phReopenDoc,
  371. #if qNames
  372.     "phReopenDoc",
  373. #endif
  374.     purgeable) {
  375.     {    /* array DITLarray: 3 elements */
  376.         /* [1] */
  377.         {70, 198, 88, 272},
  378.         Button {
  379.             enabled,
  380.             "OK"
  381.         };
  382.         /* [2] */
  383.         /*    ^0 = name of document
  384.         */
  385.         
  386.         {10, 70, 65, 272},
  387.         StaticText {
  388.             disabled,
  389.             "“^0” is already open."
  390.         };
  391.         /* [4] */
  392.         {10, 20, 42, 52},
  393.         Icon {
  394.             disabled,
  395.             1
  396.         }
  397.     }
  398. };
  399.  
  400.  
  401. /* used when the space is very low */
  402.  
  403. resource 'DITL' (phSpaceIsLow,
  404. #if qNames
  405.     "phSpaceIsLow",
  406. #endif
  407.     purgeable) {
  408.     {    /* array DITLarray: 3 elements */
  409.         /* [1] */
  410.         {70, 198, 88, 272},
  411.         Button {
  412.             enabled,
  413.             "OK"
  414.         };
  415.         /* [2] */
  416.         {10, 70, 65, 272},
  417.         StaticText {
  418.             disabled,
  419.             "Memory space is low.  "
  420.             "Some commands may be disabled."
  421.         };
  422.         /* [4] */
  423.         {10, 20, 42, 52},
  424.         Icon {
  425.             disabled,
  426.             1
  427.         }
  428.     }
  429. };
  430.  
  431.  
  432. /* used when the user attempts to run an app on unsupported ROMs */
  433.  
  434. resource 'DITL' (phUnsupportedConfiguration,
  435. #if qNames
  436.     "phUnsupportedConfiguration",
  437. #endif
  438.     purgeable) {
  439.     {    /* array DITLarray: 3 elements */
  440.         /* [1] */
  441.         {120, 198, 138, 272},
  442.         Button {
  443.             enabled,
  444.             "OK"
  445.         };
  446.         /* [2] */
  447.         {10, 70, 115, 272},
  448.         StaticText {
  449.             disabled,
  450.             "Your computer lacks the required hardware or system software to run this application."
  451.         };
  452.         /* [3] */
  453.         {10, 20, 42, 52},
  454.         Icon {
  455.             disabled,
  456.             0
  457.         }
  458.     }
  459. };
  460.  
  461. /* used to offer a read-only copy of a file when writing isn't possible */
  462.  
  463. resource 'DITL' (phOfferReadOnly,
  464. #if qNames
  465.     "phOfferReadOnly",
  466. #endif
  467.     purgeable) {
  468.     {    /* array DITLarray: 4 elements */
  469.         /* [1] */
  470.         {80, 198, 98, 272},
  471.         Button {
  472.             enabled,
  473.             "OK"
  474.         };
  475.         /* [2] */
  476.         {80, 20, 98, 94},
  477.         Button {
  478.             enabled,
  479.             "Cancel"
  480.         };
  481.         /* [3] */
  482.         /*    ^0 = name of document */
  483.         {10, 70, 75, 272},
  484.         StaticText {
  485.             disabled,
  486.             "“^0” can’t be opened for writing.  Do you want to open it anyway?"
  487.         };
  488.         /* [4] */
  489.         {10, 20, 42, 52},
  490.         Icon {
  491.             disabled,
  492.             2
  493.         }
  494.     }
  495. };
  496.  
  497.  
  498. /* Used in dialogs and TEViews when the user exceeds the # of characters */
  499.  
  500. resource 'DITL' (phTooManyChars,
  501. #if qNames
  502.     "phTooManyChars",
  503. #endif
  504.     purgeable) {
  505.     {    /* array DITLarray: 3 elements */
  506.         /* [1] */
  507.         {82, 198, 100, 272},
  508.         Button {
  509.             enabled,
  510.             "OK"
  511.         };
  512.         /* [2] */
  513.         {10, 70, 77, 272},
  514.         StaticText {
  515.             disabled,
  516.             "Cannot add any more characters here."
  517.         };
  518.         /* [3] */
  519.         {10, 20, 42, 52},
  520.         Icon {
  521.             disabled,
  522.             0
  523.         }
  524.     }
  525. };
  526.  
  527. resource 'DITL' (phStylesTooBig,
  528. #if qNames
  529.     "phStylesTooBig",
  530. #endif
  531.     purgeable) {
  532.     {    /* array DITLarray: 3 elements */
  533.         /* [1] */
  534.         {82, 198, 100, 272},
  535.         Button {
  536.             enabled,
  537.             "OK"
  538.         };
  539.         /* [2] */
  540.         {10, 70, 77, 272},
  541.         StaticText {
  542.             disabled,
  543.             "Cannot remember the styles associated with the text.  "
  544.             "The text is intact, however."
  545.         };
  546.         /* [3] */
  547.         {10, 20, 42, 52},
  548.         Icon {
  549.             disabled,
  550.             0
  551.         }
  552.     }
  553. };
  554.  
  555. resource 'ALRT' (phGenError,
  556. #if qNames
  557.     "phGenError",
  558. #endif
  559.     purgeable) {
  560.     {90, 110, 238, 402},
  561.     phGenError,
  562.     {    /* array: 4 elements */
  563.         /* [1] */
  564.         OK, visible, silent;
  565.         /* [2] */
  566.         OK, visible, silent;
  567.         /* [3] */
  568.         OK, visible, silent;
  569.         /* [4] */
  570.         OK, visible, silent
  571.     }
  572. };
  573.  
  574. resource 'ALRT' (phCmdErr,
  575. #if qNames
  576.     "phCmdErr",
  577. #endif
  578.     purgeable) {
  579.     {90, 110, 238, 402},
  580.     phCmdErr,
  581.     {    /* array: 4 elements */
  582.         /* [1] */
  583.         OK, visible, silent;
  584.         /* [2] */
  585.         OK, visible, silent;
  586.         /* [3] */
  587.         OK, visible, silent;
  588.         /* [4] */
  589.         OK, visible, silent
  590.     }
  591. };
  592.  
  593. resource 'ALRT' (phUnknownErr,
  594. #if qNames
  595.     "phUnknownErr",
  596. #endif
  597.     purgeable) {
  598.     {90, 110, 238, 402},
  599.     phUnknownErr,
  600.     {    /* array: 4 elements */
  601.         /* [1] */
  602.         OK, visible, silent;
  603.         /* [2] */
  604.         OK, visible, silent;
  605.         /* [3] */
  606.         OK, visible, silent;
  607.         /* [4] */
  608.         OK, visible, silent
  609.     }
  610. };
  611.  
  612. resource 'ALRT' (phSaveChanges,
  613. #if qNames
  614.     "phSaveChanges",
  615. #endif
  616.     purgeable) {
  617.     {100, 110, 220, 402},
  618.     phSaveChanges,
  619.     {    /* array: 4 elements */
  620.         /* [1] */
  621.         OK, visible, silent;
  622.         /* [2] */
  623.         OK, visible, silent;
  624.         /* [3] */
  625.         OK, visible, silent;
  626.         /* [4] */
  627.         OK, visible, silent
  628.     }
  629. };
  630.  
  631. resource 'ALRT' (phRevert,
  632. #if qNames
  633.     "phRevert",
  634. #endif
  635.     purgeable) {
  636.     {100, 110, 208, 402},
  637.     phRevert,
  638.     {    /* array: 4 elements */
  639.         /* [1] */
  640.         OK, visible, silent;
  641.         /* [2] */
  642.         OK, visible, silent;
  643.         /* [3] */
  644.         OK, visible, silent;
  645.         /* [4] */
  646.         OK, visible, silent
  647.     }
  648. };
  649.  
  650. resource 'ALRT' (phFileChanged,
  651. #if qNames
  652.     "phFileChanged",
  653. #endif
  654.     purgeable) {
  655.     {100, 110, 238, 402},
  656.     phFileChanged,
  657.     {    /* array: 4 elements */
  658.         /* [1] */
  659.         OK, visible, silent;
  660.         /* [2] */
  661.         OK, visible, silent;
  662.         /* [3] */
  663.         OK, visible, silent;
  664.         /* [4] */
  665.         OK, visible, silent
  666.     }
  667. };
  668.  
  669. resource 'ALRT' (phPurgeOld,
  670. #if qNames
  671.     "phPurgeOld",
  672. #endif
  673.     purgeable) {
  674.     {100, 110, 253, 402},
  675.     phPurgeOld,
  676.     {    /* array: 4 elements */
  677.         /* [1] */
  678.         OK, visible, silent;
  679.         /* [2] */
  680.         OK, visible, silent;
  681.         /* [3] */
  682.         OK, visible, silent;
  683.         /* [4] */
  684.         OK, visible, silent
  685.     }
  686. };
  687.  
  688. resource 'ALRT' (phReopenDoc,
  689. #if qNames
  690.     "phReopenDoc",
  691. #endif
  692.     purgeable) {
  693.     {100, 110, 198, 402},
  694.     phReopenDoc,
  695.     {    /* array: 4 elements */
  696.         /* [1] */
  697.         OK, visible, silent;
  698.         /* [2] */
  699.         OK, visible, silent;
  700.         /* [3] */
  701.         OK, visible, silent;
  702.         /* [4] */
  703.         OK, visible, silent
  704.     }
  705. };
  706.  
  707. resource 'ALRT' (phSpaceIsLow,
  708. #if qNames
  709.     "phSpaceIsLow",
  710. #endif
  711.     purgeable) {
  712.     {100, 110, 198, 402},
  713.     phSpaceIsLow,
  714.     {    /* array: 4 elements */
  715.         /* [1] */
  716.         OK, visible, silent;
  717.         /* [2] */
  718.         OK, visible, silent;
  719.         /* [3] */
  720.         OK, visible, silent;
  721.         /* [4] */
  722.         OK, visible, silent
  723.     }
  724. };
  725.  
  726. resource 'ALRT' (phUnsupportedConfiguration,
  727. #if qNames
  728.     "phUnsupportedConfiguration",
  729. #endif
  730.     purgeable) {
  731.     {90, 110, 238, 402},
  732.     phUnsupportedConfiguration,
  733.     {    /* array: 4 elements */
  734.         /* [1] */
  735.         OK, visible, silent;
  736.         /* [2] */
  737.         OK, visible, silent;
  738.         /* [3] */
  739.         OK, visible, silent;
  740.         /* [4] */
  741.         OK, visible, silent
  742.     }
  743. };
  744.  
  745. resource 'ALRT' (phOfferReadOnly,
  746. #if qNames
  747.     "phOfferReadOnly",
  748. #endif
  749.     purgeable) {
  750.     {100, 110, 208, 402},
  751.     phOfferReadOnly,
  752.     {    /* array: 4 elements */
  753.         /* [1] */
  754.         OK, visible, silent;
  755.         /* [2] */
  756.         OK, visible, silent;
  757.         /* [3] */
  758.         OK, visible, silent;
  759.         /* [4] */
  760.         OK, visible, silent
  761.     }
  762. };
  763.  
  764. resource 'ALRT' (phTooManyChars,
  765. #if qNames
  766.     "phTooManyChars",
  767. #endif
  768.     purgeable) {
  769.     {100, 110, 210, 402},
  770.     phTooManyChars,
  771.     {    /* array: 4 elements */
  772.         /* [1] */
  773.         OK, visible, silent;
  774.         /* [2] */
  775.         OK, visible, silent;
  776.         /* [3] */
  777.         OK, visible, silent;
  778.         /* [4] */
  779.         OK, visible, silent
  780.     }
  781. };
  782.  
  783. resource 'ALRT' (phStylesTooBig,
  784. #if qNames
  785.     "phStylesTooBig",
  786. #endif
  787.     purgeable) {
  788.     {100, 110, 210, 402},
  789.     phStylesTooBig,
  790.     {    /* array: 4 elements */
  791.         /* [1] */
  792.         OK, visible, silent;
  793.         /* [2] */
  794.         OK, visible, silent;
  795.         /* [3] */
  796.         OK, visible, silent;
  797.         /* [4] */
  798.         OK, visible, silent
  799.     }
  800. };
  801.  
  802. /* list mapping error codes to failure reasons */
  803.  
  804. resource 'errs' (errReasonID,
  805. #if qNames
  806.     "errReasonID",
  807. #endif
  808.     purgeable) {
  809.     {    whichList, 0, errReasonIDStrings;
  810.         -117, -108, 4;        // Memory Manager errors
  811.         -42, -42, 21;        // too many files are open
  812.         -47, -47, 7;        // files are open
  813.         -49, -49, 7;        // can't have > 1 writer to a file
  814.         -54, -54, 6;        // can't open locked file for writing
  815.         -45, -45, 6;        // file locked
  816.         -46, -44, 3;        // volumes locked
  817.         -34, -33, 2;        // disk full
  818.         -53, -53, 20;        // volume offline
  819.         -84, -33, 5;        // other File Manager / disk errors
  820.         -124, -124, 14;     // Lost volume on AppleTalk
  821.         -127, -120, 5;        // HFS errors
  822.         -27, -27, 10;        // printer I/O error
  823.         -192, -192, 22;        // Resource not found
  824.         -20000, -20000, 8;    // MacApp error code: could not spool print file
  825.         -20001, -20001, 11; // MacApp error code: could not revert because file was deleted
  826.         -20003, -20003, 12; // MacApp error code: user tried to Save As or Save a Copy
  827.                             // in an opened document
  828.         -20004, -20004, 13; // MacApp error code: user did Revert but file type changed
  829.         -4101, -4101, 9;    // printer not found (PAP)
  830.         -4100, -4096, 10;    // printer comm error
  831.         -5000, -5000, 15;    // AFP access error
  832.         -5006, -5006, 7;    // AFP: deny conflict
  833.         -5029, -5000, 14;    // AFP errors
  834.         -20005, -20005, 16; // MacApp error code: printer driver file not found
  835.         -95, -91, 17;        // AppleTalk operation errors
  836.         -98, -97, 18;        // AppleTalk could not be opened
  837.         -20006, -20006, 19; // Can't open file of given type
  838.         -20007, -20007, 23; // Function is not yet implemented
  839.         -20008, -20008, 24; // Class is missing. (Usually due to dead stripping)
  840.         minErr, maxErr, 1
  841.     }
  842. };
  843.  
  844.  
  845. /* list mapping error codes to recovery strings */
  846.  
  847. resource 'errs' (errRecoveryID,
  848. #if qNames
  849.     "errRecoveryID",
  850. #endif
  851.     purgeable) {
  852.     {    whichList, 0, errRecoveryIDStrings;
  853.         -42, -42, 4;
  854.         -45, -45, 1;
  855.         -4101, -4101, 2;
  856.         -20003, -20003, 3;
  857.         -20005, -20005, 2;
  858.         -20008, -20008, 5
  859.     }
  860. };
  861.  
  862. /* error explanations */
  863.  
  864. resource 'STR#' (errReasonIDStrings,
  865. #if qNames
  866.     "error explanations",
  867. #endif
  868.     purgeable) {
  869.     {    /* [1] */    "of a program error";                                // catch-all
  870.         /* [2] */    "the disk is full";
  871.         /* [3] */    "the disk is locked";
  872.         /* [4] */    "there is not enough memory";
  873.         /* [5] */    "of a disk error";
  874.         /* [6] */    "the file is locked";
  875.         /* [7] */    "the file is already in use or was left open";
  876.         /* [8] */    "of a problem writing the print file";
  877.         /* [9] */    "the printer could not be found";
  878.         /* [10] */    "of a problem communicating with the printer";
  879.         /* [11] */    "its disk copy was deleted";
  880.         // used when user picks Revert and file was deleted
  881.  
  882.         /* [12] */    "that document is currently open";
  883.         // used when user does Save As or Save a Copy In and specifies a document that is already open
  884.  
  885.         /* [13] */    "its disk copy was changed";
  886.         // used when user does a Revert and the file type has been changed
  887.  
  888.         /* [14] */    "of a problem with the file server";                // catch-all AFP error
  889.         /* [15] */    "you do not have the necessary access privileges";    // AFP: access denied
  890.         /* [16] */    "the selected printing resource could not be found";// Couldn't open print driver
  891.         /* [17] */    "of a problem with AppleTalk";                        // AppleTalk operation errors
  892.         /* [18] */    "AppleTalk is not connected";                        // AppleTalk open errors
  893.         /* [19] */    "it is not the right kind of document";                // File is the wrong type
  894.         /* [20] */    "the disk is not available";
  895.         // Volume is offline: asynch I/O or command-.
  896.  
  897.         /* [21] */    "there are too many files open";                    // Resource not found
  898.         /* [22] */    "the required resources were not found";
  899.         /* [23] */    "this feature is not implemented";
  900.         /* [24] */    "“^3”, an internal component, is missing"
  901.  
  902.     }
  903. };
  904.  
  905.  
  906. /* recovery strings */
  907.  
  908. resource 'STR#' (errRecoveryIDStrings,
  909. #if qNames
  910.     "recovery strings",
  911. #endif
  912.     purgeable) {
  913.     {    /* [1] */    "Use the “Get Info” command in the Finder"
  914.                         " to unlock the file.";
  915.         /* [2] */    "Use “Chooser” to select a printer and try again.";
  916.         // this is used if (1) the chosen LaserWriter can't be found or
  917.         // (2) the chosen printer driver file can't be found
  918.  
  919.         /* [3] */    "Save using a different name, or close the document and try again.";
  920.         /* [4] */    "Try closing some windows and try again.";
  921. #if qDebug
  922.         /* [5] */    "Call Apple for a secret decoder ring."
  923. #else
  924.         /* [5] */    "Please contact the developer."
  925. #endif
  926.     }
  927. };
  928.  
  929. /* strings describing the operation; these are used in error alerts */
  930. resource 'STR#' (errOperationsIDStrings,
  931. #if qNames
  932.     "strings describing the operation",
  933. #endif
  934.     purgeable) {
  935.     {    /* [1] */    "start the application";
  936.         /* [2] */    "save “^3”";
  937.         /* [3] */    "revert to the previous version of “^3”";
  938.         /* [4] */    "print “^3”";
  939.         /* [5] */    "create a new document";
  940.         /* [6] */    "open “^3”";
  941.         /* [7] */    "save as “^3”";
  942.         /* [8] */    "save a copy in “^3”";
  943.         /* [9] */    "display the contents of the window";
  944.         /* [10] */    "make the clipboard available inside the application";
  945.         /* [11] */    "make the clipboard available outside the application"
  946.         
  947.     }
  948. };
  949.  
  950.  
  951. resource 'STR#' (kIDBuzzString,
  952. #if qNames
  953.     "IDBuzzString",
  954. #endif
  955.     purgeable) {
  956.      {    /* [1] */    "Save this document as:";    /* Std File prompt */
  957.         /* [2] */    "Save a copy in:";            /* Std File prompt */
  958.         /* [3] */    "Show Clipboard";            /* used as menu command */
  959.         /* [4] */    "Hide Clipboard";            /* used as menu command */
  960.         /* [5] */    "Undo <<<>>>";                /* used as menu command */
  961.         /* [6] */    "Redo <<<>>>";                /* used as menu command */
  962.             /* for Undo and Redo, the <<<>>> string will be replaced
  963.                 by the name of the command */                
  964.         /* [7] */    "Unable to display contents at the moment";
  965.                                 /* used when Clipboard cannot be displayed */
  966.         /* [8] */    "Untitled-<<<>>>";            /* name of an untitled document */
  967.             /* the <<<>>> string will be replaced by a sequence number */
  968.         /* [9] */    "closing";            /* see Alert 110: "Save changes before ___" */
  969.         /* [10] */    "quitting";         /* see Alert 110: "Save changes before ___" */
  970.         /* [11] */    "Can’t Undo";                    /* used as menu command */
  971.         /* [12] */    "save";             /* see Alert 113: "Do you want to ___ anyway?" */
  972.         /* [13] */    "revert"            /* see Alert 113: "Do you want to ___ anyway?" */
  973.     }
  974. };
  975.  
  976.  
  977. #if qTemplateViews
  978. resource 'view' (kIDClipWindow,
  979. #if qNames
  980.     "IDClipWindow",
  981. #endif
  982.     purgeable)  { {
  983.     root, 'WIND', { 270, 40 }, { 80, 410 }, sizeVariable, sizeVariable, notShown, enabled,
  984.     Window {
  985.         "",
  986.             zoomDocProc, goAwayBox, resizable, modeless, ignoreFirstClick, dontFreeOnClosing,
  987.             disposeOnFree, closesDocument, openWithDocument, dontAdaptToScreen,
  988.             dontStagger, dontForceOnScreen, dontCenter, noID, "Clipboard" };
  989.  
  990.     'WIND', 'SCLR', { 0, 0 }, { 80-kSBarSizeMinus1, 410-kSBarSizeMinus1 },
  991.     sizeRelSuperView, sizeRelSuperView, shown, enabled,
  992.     Scroller {
  993.         "",
  994.             vertScrollBar, horzScrollBar, 0, 0, 16, 16,
  995.             vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
  996.     
  997.     'SCLR', kIDClipView, { 0, 0 }, { 500, 500 }, sizeVariable, sizeVariable, shown, disabled,
  998.     View { "TDeskScrapView" }
  999. } };
  1000. #else
  1001. resource 'WIND' (kIDClipWindow,
  1002. #if qNames
  1003.     "IDClipWindow",
  1004. #endif
  1005.     purgeable) {
  1006.     {270, 40, 350, 450},
  1007.     zoomDocProc,
  1008.     invisible,
  1009.     goaway,
  1010.     0x0,
  1011.     "Clipboard"
  1012. };
  1013. #endif
  1014.  
  1015.  
  1016. #if qTemplateViews
  1017. resource 'view' (kScrollBarId,
  1018. #if qNames
  1019.     "kScrollBarId",
  1020. #endif
  1021.     purgeable)  { {
  1022.     root, noID, { 0, 0 }, { 0, 0 }, sizeVariable, sizeVariable, shown, enabled,
  1023.     ScrollBar {
  1024.         "",
  1025.             adnLineLeft, { 1, 1 }, sizeable, notDimmed, notHilited, doesntDismiss,
  1026.             noInset, systemFont, 0, 0, 0 };
  1027. } };
  1028. #endif
  1029.  
  1030. #if qInspector && !qDebug
  1031. resource 'cmnu' (mDebug,
  1032. #if qNames
  1033.     "Inspector",
  1034. #endif
  1035.     nonpurgeable) {
  1036.     mDebug,
  1037.     textMenuProc,
  1038.     0x7FFFFFBF,
  1039.     enabled,
  1040.     "Inspector",
  1041.     {
  1042.     "New Inspector Window",                 noIcon, noKey,    noMark, plain,    cNewInspectorWindow
  1043.     }
  1044. };
  1045. #endif
  1046.  
  1047.  
  1048. /* ===========================     Inspector Window    ============================= */
  1049.  
  1050. #if qTemplateViews && qInspector
  1051. /* For building the view templates */
  1052. resource 'view' (kInspectorWindowType,
  1053. #if qNames
  1054.     "InspectorWindowType",
  1055. #endif
  1056.     purgeable) {
  1057.     {
  1058.     root, 'WIND', { 0, 0 }, { 252, 215 }, sizeVariable, sizeVariable, shown, enabled,
  1059.     Window        { "TInspectWindow", zoomDocProc, goAwayBox, resizable,
  1060.                 modeless, ignoreFirstClick,freeOnClosing, disposeOnFree, closesDocument,
  1061.                 openWithDocument, dontAdaptToScreen, dontstagger, forceOnScreen,
  1062.                 dontCenter, 'IVW3', "Inspector <<<>>>" };
  1063.  
  1064.                 'WIND', 'SCL1', { 0, 0 }, { 12 * 7, 95 },
  1065.                 sizeFixed, sizeFixed, shown, enabled,
  1066.         Scroller    { "", vertScrollBar, noHorzScrollBar, 0, 0, 16, 16,
  1067.                 vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
  1068.  
  1069.                 'SCL1', 'IVW1', { 0, 0 }, { 0, 95 }, sizeVariable, sizeSuperView,
  1070.                 shown, enabled,
  1071.         View    { "TClassListView" };
  1072.  
  1073.                 'WIND', 'SCL2', { 0, 111 }, { 12 * 7, 200-111 },
  1074.                 sizeFixed, sizeRelSuperView, shown, enabled,
  1075.         Scroller    { "", vertScrollBar, noHorzScrollBar, 0, 0, 16, 16,
  1076.                 vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
  1077.  
  1078.                 'SCL2', 'IVW2', { 0, 0 }, { 0, 200 - 111 }, sizeVariable,
  1079.                 sizeRelSuperView, shown, enabled,
  1080.         View    { "TObjListView"  };
  1081.  
  1082.                 'WIND', 'SCL3', { 12 * 7 + 1, 0 }, { (252-(12*7)), 200 },
  1083.                 sizeRelSuperView, sizeRelSuperView, shown, enabled,
  1084.         Scroller    { "", vertScrollBar, horzScrollBar, 0, 0, 16, 16,
  1085.                 vertConstrain, horzConstrain, { 0, 0, 0, 0 } };
  1086.  
  1087.                 'SCL3', 'IVW3', { 0, 0 }, { 0, 600 }, sizeVariable,
  1088.                  sizeVariable, shown, enabled,
  1089.         View    { "TObjectView" }
  1090.  
  1091.     }
  1092. };
  1093. #endif
  1094.  
  1095. #if !qTemplateViews && qInspector
  1096. /* This guy is used when the template stuff isn't */
  1097.  
  1098. resource 'WIND' (kInspectorWindowType,
  1099. #if qNames
  1100.     "InspectorWindowType",
  1101. #endif
  1102.     purgeable) {
  1103.     {0, 0, 250, 215},
  1104.     zoomDocProc,
  1105.     invisible,
  1106.     goAway,
  1107.     0x0,
  1108.     "Inspector <<<>>>"
  1109. };
  1110. #endif
  1111.